package com.jinglin.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 评论
 * </p>
 *
 * @author ${author}
 * @since 2025-03-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="VideoComment对象", description="评论")
public class VideoComment extends Model<VideoComment> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "评论ID")
      @TableId(value = "comment_id", type = IdType.ASSIGN_ID)
    private String  commentId;

    @ApiModelProperty(value = "父级评论ID")
    private String  pCommentId;

    @ApiModelProperty(value = "视频ID")
    private String videoId;

    @ApiModelProperty(value = "视频用户ID")
    private String videoUserId;

    @ApiModelProperty(value = "回复内容")
    private String content;

    @ApiModelProperty(value = "图片")
    private String imgPath;

    @ApiModelProperty(value = "用户ID")
    private String userId;

    @ApiModelProperty(value = "回复人ID")
    private String replyUserId;

    @TableField(exist = false)
    private List<VideoComment> children;

    @TableField(exist = false)
    private String nickName;

    @TableField(exist = false)
    private String avatar;

    @TableField(exist = false)
    private String replyNickName;

    @TableField(exist = false)
    private String replyAvatar;

    @ApiModelProperty(value = "0:未置顶  1:置顶")
    private Integer topType;

    @ApiModelProperty(value = "发布时间")
    private LocalDateTime postTime;

    @ApiModelProperty(value = "喜欢数量")
    private Integer likeCount;

    @ApiModelProperty(value = "讨厌数量")
    private Integer hateCount;

    @TableField(exist = false)
    private String videoCover;

    @TableField(exist = false)
    private String videoName;

    @ApiModelProperty(value = "删除为0 未删除为1")
    @TableLogic
    private Integer deleted;


    @Override
    protected Serializable pkVal() {
        return this.commentId;
    }

}
